
				<div class="poll">
					<p class="judulpoll5"> Poll Topic:</p>
					<p class=" judulpoll droid" ><?php if (isset($list_pertanyaan[0]['nama_tema'])) echo $list_pertanyaan[0]['nama_tema'];?> <br />
					<span class="judulpollx">| <?php if (isset($list_pertanyaan)) echo count($list_pertanyaan);?> Pertanyaan</span></p>
					<p class="judulpoll2"><a href="<?php echo base_url()."polling/polling_con/hasil_topic_all/".$id_tema;?>">All Courses</a> | <a href="<?php echo base_url()."polling/polling_con/polling_topic/".$id_tema; ?>">Spesific Course</a></p>
				</div>
				<div class="clear"></div>
				<div class="bagbawah">
					<div class="par">
						<div class="par4"><?php echo $kode_pelatihan."-".$angkatan?> | <br/>
						<?php if (isset($nama_course[0]['NAMA_PELATIHAN'])) echo $nama_course[0]['NAMA_PELATIHAN']; ?></div>
						<?php if (isset($jumlah_responden)){
                                                    echo "
                                                        <div class='droid par2'>".$jumlah_responden."</div>
                                                        <div class='par3'>Respondent</div>
                                                    ";
                                                }
                                                ?>
					</div>
					<div id="sebelum">

                                            <?php
                                                if (isset($list_pertanyaan)){
                                                    $counter=0;
                                                    $essay_counter = 0;
                                                    for ($i=0;$i<count($list_pertanyaan);$i++){
                                                        if (($list_pertanyaan[$i]['tipe_pertanyaan']=="multi") || ($list_pertanyaan[$i]['tipe_pertanyaan']=="single")){
                                                            $counter+=1;
                                                            echo "
                                                                <div class='hasilnih'>
                                                                        <p class='judulpoll3'><span class='nomer'>#".($counter)."</span>".$list_pertanyaan[$i]['isi_pertanyaan']."</p>
                                                                        <div class='tempatgrafik kiri' ><span id='grafik' class='sparklines'>";
                                                                        if (isset($list_pertanyaan[$i]['list_jawaban'])){
                                                                            for ($j=0;$j<count($list_pertanyaan[$i]['list_jawaban']);$j++){
                                                                                if (isset($list_pertanyaan[$i]['list_jawaban'][$j]['persentase'])){
                                                                                    echo $list_pertanyaan[$i]['list_jawaban'][$j]['persentase'].",";
                                                                                }
                                                                            }
                                                                        }
                                                                        echo "
                                                                        </span></div>
                                                                        <div class='malam kiri'>";
                                                                        if (isset($list_pertanyaan[$i]['list_jawaban'])){
                                                                            for ($j=0;$j<count($list_pertanyaan[$i]['list_jawaban']);$j++){
                                                                                if (isset($list_pertanyaan[$i]['list_jawaban'][$j]['persentase'])){
                                                                                    echo "
                                                                                      <p><span class='alebar a".($j+1)."'></span>".$list_pertanyaan[$i]['list_jawaban'][$j]['isi_pilihan']." ".$list_pertanyaan[$i]['list_jawaban'][$j]['persentase']."% <span class='spand'>—".$list_pertanyaan[$i]['list_jawaban'][$j]['votes']." Votes</span></p>
                                                                                    ";
                                                                                }
                                                                            }
                                                                        }
                                                                        echo"
                                                                            </div>
                                                                </div>
                                                                <div class='clear'></div><br>

                                                            ";
                                                        }
                                                        else{ // essay
                                                            $counter+=1;
                                                            $essay_counter+=1;
//                                                            echo (17 - (17 % 5)) / 5;
                                                            // menghitung jumlah tabs;
                                                            if (isset($list_pertanyaan[$i]['list_jawaban'])){
                                                                echo "
                                                                    <p class='judulpoll3'><span class='nomer'>#".($counter)."</span>".$list_pertanyaan[$i]['isi_pertanyaan']."</p>
                                                                    <ul class='tabs'>
                                                                        ";
                                                                        if (isset($list_pertanyaan[$i]['list_jawaban'])){
                                                                            $total = count($list_pertanyaan[$i]['list_jawaban']);
                                                                            $divide = ($total-($total%5))/5;
                                                                            if ($total%5>0){
                                                                                $divide+=1;
                                                                            }
                                                                            for ($j=1;$j<=$divide;$j++){
                                                                                echo "
                                                                                    <li><a href='#tab".$essay_counter.$j."'>".$j."</a></li>
                                                                                    ";
                                                                            }
                                                                            echo "</ul>";
                                                                            echo "
                                                                                <div class='tab_container'>";
                                                                            $content_counter=0;
                                                                            for ($j=1;$j<=$divide;$j++){
                                                                                echo "<div id='tab".$essay_counter.$j."' class='tab_content'>";
                                                                                $end_counter=0;
                                                                                while (($content_counter<$total) && ($end_counter<5)){
                                                                                    echo "<p>".$list_pertanyaan[$i]['list_jawaban'][$content_counter]['JAWABAN']." <span class='spand'>—".$list_pertanyaan[$i]['list_jawaban'][$content_counter]['NAMA_USER']."</span></p>";
                                                                                    $content_counter+=1;
                                                                                    $end_counter+=1;
                                                                                }
                                                                                echo "</div>";
                                                                            }
                                                                            echo "</div><br>";
                                                                        }

                                                            }
                                                        }
                                                    }
                                                }
                                            ?>
                                            
                                            
					</div><!-- end div id sebelum -->
				</div><!-- end div id bagbawah -->